/**
 * CopyKnot.h
 * Coyright (c) 2009 Xiaofeng Gu. All Rights Reserved.
 * Author : Xiaofeng Gu
 *
 * Creation Data : 2009/07/13
 */
#pragma once

#include "SKPipeline.h"


class CFamily;
class CCopyKnotProcessCard
{
public:
	CCopyKnotProcessCard() : m_pParent(NULL), m_lFrameIndex(0)
	{}
	virtual~ CCopyKnotProcessCard() {}


	void					SetParent(CFamily* pFamily) { m_pParent = pFamily; }
	CFamily*				GetParent() { return m_pParent; }

	void					SetFrameIndex(long index) { m_lFrameIndex = index; }
	long					GetFrameIndex() { return m_lFrameIndex; }

private:
	CFamily*				m_pParent;
	long					m_lFrameIndex;
};





class CCopyKnot : public CSKDistributor
{
public:
	DECALRE_INTERFACE_PART(OnExecute);

	CCopyKnot(ISKPipeline* pNextProcess, CProcessDraft* pData)
		: CSKDistributor(pNextProcess, pData)
	{}

	virtual ~CCopyKnot() {}

	static CKnot*						Copy(CKnot* pKnot);

protected:
	static void							Copy(CTransNode* pNode, CTransNode* pNewNode, Nodes* pNewNodes);

private:
	CKnot*								m_pKnot;
};